﻿<%@ Page Title="" Language="C#" MasterPageFile="~/View/Master.Master" AutoEventWireup="true" CodeBehind="SelectStationeryItems.aspx.cs" Inherits="PresentationLayer.View.DepartmentEmployee.SelectStationeryItems" %>

<%@ Register src="../mainMenu.ascx" tagname="mainMenu" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="100%">
    <tr>
        <td style="height:auto;width:200px;vertical-align:top;">

            <uc1:mainMenu ID="mainMenu1" runat="server" />


        </td>
        <td>
    <center><h2><u>Select Stationery Items<asp:ScriptManager ID="ScriptManager1" 
            runat="server">
        </asp:ScriptManager>
        </u></h2></center>
<div>        
Category:  
    <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="True" 
        onselectedindexchanged="ddlCategory_SelectedIndexChanged" 
        AppendDataBoundItems="True" DataTextField="CategoryName" 
        DataValueField="CategoryId">
        <asp:ListItem Value="0">---Select Category---</asp:ListItem>
    </asp:DropDownList>        
</div>
            
                    
                
<br />
<div>
<table  cellspacing="0" style="color: white; font-weight: bold;WIDTH:650px; BORDER-COLLAPSE:collapse">
<tr class="tableHeader" bgcolor="#507CD1"  >
<th style="WIDTH:50px">
Add
</th>
<th style="WIDTH: 100px">
Item Number
</th>
<th style="WIDTH:100px">
Category
</th>
<th style="WIDTH:200px">
Description
</th>
<th style="WIDTH:100px">
Available Qty
</th>
<th style="WIDTH:100px">
Unit of Measure
</th>
</tr>
</table>
</div> 
  <asp:Panel ID="Panel1" height="350" Width="667px" ScrollBars="Vertical" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
        
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" ForeColor="#333333" GridLines="None" ShowHeader="False" 
            Width="650px">
            <AlternatingRowStyle BackColor="White"/>
            <Columns>
                <asp:TemplateField HeaderText="Add">
                    <EditItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" />
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="chkCheckToAdd" runat="server" AutoPostBack="True" 
                            oncheckedchanged="chkCheckToAdd_CheckedChanged"/> 
                            
                    </ItemTemplate>
                    <ItemStyle Width="50px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Item Number">
                    <ItemTemplate>
                        <asp:Label ID="lblItemId" runat="server" Text='<%# Bind("ItemId") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("ItemId") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemStyle Width="100px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Category">
                    <ItemTemplate>
                        <asp:Label ID="lblCategory" runat="server" Text='<%# Bind("CategoryName") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("CategoryName") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemStyle Width="100px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Description">
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Description") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblDescription" runat="server" Text='<%# Bind("Description") %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle Width="200px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Available Qty">
                    <ItemTemplate>
                        <asp:Label ID="lblAvailableQty" runat="server" Text='<%# Bind("TotalQty") %>'></asp:Label>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("TotalQty") %>'></asp:TextBox>
                    </EditItemTemplate>
                    <ItemStyle Width="100px" />
                </asp:TemplateField>
                <asp:BoundField DataField="UOM" HeaderText="Unit of Measure" >
                <ItemStyle Width="100px" />
                </asp:BoundField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        
        </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="GridView2" />
                    <asp:AsyncPostBackTrigger ControlID="ddlCategory" 
                        EventName="SelectedIndexChanged" />
                </Triggers>
            </asp:UpdatePanel>
            </asp:Panel>
         <div>
        <asp:Button ID="btnAdd" runat="server" Text="Add" Width="74px" 
            onclick="btnAdd_Click" />
     &nbsp;<asp:Button ID="btnBack" runat="server" onclick="btnBack_Click" Text="Back" 
                        Width="72px" />
     </div>


        
</td></tr></table>
</asp:Content>
